package com.xitang.common.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xitang.common.bean.BizCondition;
import com.xitang.common.bean.BizUser;
import com.xitang.common.bean.SysUser;
import com.xitang.common.mapper.BizConditionMapper;
import com.xitang.common.mapper.BizUserMapper;
import com.xitang.common.mapper.SysUserMapper;
import com.xitang.common.service.IConditionService;
import com.xitang.common.service.IUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConditionServiceImpl implements IConditionService {
    @Autowired
    private BizConditionMapper conditionMapper;

    @Override
    public List<BizCondition> listConditions(String conditionTagCode) {
        QueryWrapper<BizCondition> wrapper = new QueryWrapper<>();
        if (StringUtils.isNotEmpty(conditionTagCode)) {
            wrapper.eq("condition_tag_code", conditionTagCode);
        }
        return conditionMapper.selectList(wrapper);
    }
}
